package com.incar.chuxing.api;


import com.incar.chuxing.bean.AccountInfoBean;
import com.incar.chuxing.bean.CarBleBean;
import com.incar.chuxing.bean.CheckPositionBean;
import com.incar.chuxing.bean.CityBoundBean;
import com.incar.chuxing.bean.InitBean;
import com.incar.chuxing.bean.ParkFeeBean;
import com.incar.chuxing.bean.PopPostBean;
import com.incar.chuxing.bean.MsgBoxBean;
import com.incar.chuxing.bean.TopMesBean;
import com.incar.chuxing.bean.AlipayPreBean;
import com.incar.chuxing.bean.AwardBean;
import com.incar.chuxing.bean.CancelOrder;
import com.incar.chuxing.bean.CarOrderDetailBean;
import com.incar.chuxing.bean.CarPayBean;
import com.incar.chuxing.bean.ChangeInfoBean;
import com.incar.chuxing.bean.ChargeDetailBean;
import com.incar.chuxing.bean.CheckCarOrderBean;
import com.incar.chuxing.bean.CheckSetupBean;
import com.incar.chuxing.bean.CityDetailBean;
import com.incar.chuxing.bean.CommitCertificateBean;
import com.incar.chuxing.bean.ComplaintsTagBean;
import com.incar.chuxing.bean.LoginBean;
import com.incar.chuxing.bean.MsgRedBean;
import com.incar.chuxing.bean.QualificationBean;
import com.incar.chuxing.bean.ExchangeCouponBean;
import com.incar.chuxing.bean.FeedbackBean;
import com.incar.chuxing.bean.DepositStatus;
import com.incar.chuxing.bean.FenceData;
import com.incar.chuxing.bean.InviteFriendsBean;
import com.incar.chuxing.bean.LogoffBean;
import com.incar.chuxing.bean.MyCouponBean;
import com.incar.chuxing.bean.NearParkOrCarBean;
import com.incar.chuxing.bean.OperateBean;
import com.incar.chuxing.bean.MapParksAndCarsBean;
import com.incar.chuxing.bean.ParkDetailBean;
import com.incar.chuxing.bean.PersonalCenterBean;
import com.incar.chuxing.bean.PlaceOrderBean;
import com.incar.chuxing.bean.ReturnCarBean;
import com.incar.chuxing.bean.ReturnDepositBean;
import com.incar.chuxing.bean.SettlementDetailBean;
import com.incar.chuxing.bean.SmsCodeBean;
import com.incar.chuxing.bean.TravelDetailBean;
import com.incar.chuxing.bean.TravelRecordBean;
import com.incar.chuxing.bean.ExistingTravel;
import com.incar.chuxing.bean.UploadImageBaidu;
import com.incar.chuxing.bean.UploadImageBean;
import com.incar.chuxing.bean.UserCarInforBean;
import com.incar.chuxing.bean.WXPreBean;
import com.incar.chuxing.bean.WalletBean;
import com.incar.chuxing.bean.PersonalInfoBean;
import com.incar.chuxing.bean.PraiseMarqueeBean;
import com.incar.chuxing.bean.RechargeAdBean;
import com.incar.chuxing.bean.ResultBean;
import com.incar.chuxing.bean.ShakeResultBean;

import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

public interface ApiService {
    //初始化
    @FormUrlEncoded
    @POST("init/init-app.json")
    Call<InitBean> initApp(@FieldMap Map<String, String> map, @Field("phoneModel") String phoneModel, @Field("style") String style);

    //开通城市的信息
    @FormUrlEncoded
    @POST("city/getCityInfo/v2")
    Call<CityDetailBean> getCityInfo(@FieldMap Map<String, String> map);

    //弹出海报
    @FormUrlEncoded
    @POST("promote/getPromoteByPopup.json")
    Call<PopPostBean> getPopPost(@FieldMap Map<String, String> map);

    //顶部消息通知
    @FormUrlEncoded
    @POST("v/message/gain-first-page-message.json")
    Call<TopMesBean> getTopMes(@FieldMap Map<String, String> map);

    //消息盒子列表
    @FormUrlEncoded
    @POST("v/message/gain-my-message.json")
    Call<MsgBoxBean> getMsg(@FieldMap Map<String, String> map, @Field("pageNo") String page, @Field("pageSize") String pageSize);

    //消息已读
    @FormUrlEncoded
    @POST("v/message/set-to-read.json")
    Call<ResultBean> readMsg(@FieldMap Map<String, String> map, @Field("messageId") String messageId);

    //全部消息已读
    @FormUrlEncoded
    @POST("v/message/set-to-read-all.json")
    Call<ResultBean> readAllMsg(@FieldMap Map<String, String> map);

    //主页个人中心红点指示
    @FormUrlEncoded
    @POST("v/message/is-exist-red.json")
    Call<MsgRedBean> getMsgRed(@FieldMap Map<String, String> map);


    //发送短信
    @FormUrlEncoded
    @POST("message/send-message.json")
    Call<SmsCodeBean> sendSms(@FieldMap Map<String, String> map, @Field("phoneNum") String phoneNum);

    //登录
    @FormUrlEncoded
    @POST("login/mobile-login.json")
    Call<LoginBean> login(@FieldMap Map<String, String> map, @Field("phoneNum") String phoneNum, @Field("code") String code,
                          @Field("deviceToken") String deviceToken);

    //修改用户头像
    @FormUrlEncoded
    @POST("v/user/update-user-info.json")
    Call<CommitCertificateBean> commitAvatar(@FieldMap Map<String, String> map, @Field("nick") String nick, @Field("head") String head);

    //修改用户个人信息
    @FormUrlEncoded
    @POST("v/user/update-user-info.json")
    Call<ChangeInfoBean> getChangePersonalInfo(@FieldMap Map<String, String> map, @Field("nick") String nick, @Field("gender") String gender, @Field("dateBirth") String dateBirth);

    //资格状态查询
    @FormUrlEncoded
    @POST("v/user/status.json")
    Call<QualificationBean> getUserStatus(@FieldMap Map<String, String> map);

    //退出登录
    @FormUrlEncoded
    @POST("v/user/logout.json")
    Call<LogoffBean> logoff(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("v/account/my-account.json")
    Call<AccountInfoBean> getAccountInfo(@FieldMap Map<String, String> map);


    //获取车地图网点和车辆
    @FormUrlEncoded
    @POST("park/get-information.json")
    Call<MapParksAndCarsBean> getParksAndCars(@FieldMap Map<String, String> map);


    //网点详情
    @FormUrlEncoded
    @POST("car/get-information.json")
    Call<ParkDetailBean> getParkDetail(@FieldMap Map<String, String> map, @Field("parkId") String parkId);

    //点立即租用，获取附近一个网点或者车辆
    @FormUrlEncoded
    @POST("park/get-nearby.json")
    Call<NearParkOrCarBean> getNearCarOrPark(@FieldMap Map<String, String> map);


    //操作车辆
    @FormUrlEncoded
    @POST("v/car/call-car.json")
    Call<OperateBean> findCar(@FieldMap Map<String, String> map, @Field("orderId") String orderId, @Field("carId") String carId);


    @FormUrlEncoded
    @POST("v/car/open-car-door.json")
    Call<OperateBean> openCar(@FieldMap Map<String, String> map, @Field("orderId") String orderId, @Field("carId") String carId, @Field("force") String force);


    @FormUrlEncoded
    @POST("v/car/close-car-door.json")
    Call<OperateBean> lockCar(@FieldMap Map<String, String> map, @Field("orderId") String orderId, @Field("carId") String carId, @Field("force") String force);

    //还车
    @FormUrlEncoded
    @POST("v/car/return-car.json")
    Call<ReturnCarBean> returnCar(@FieldMap Map<String, String> map, @Field("orderId") String orderId, @Field("carId") String carId, @Field("parkId") String parkId, @Field("userRemark") String userRemark);


    //确认租用电车
    @FormUrlEncoded
    @POST("v/order/add.json")
    Call<PlaceOrderBean> rentCar(@FieldMap Map<String, String> map, @Field("carId") String carId, @Field("onParkId") String onParkId, @Field("isAbatement") String isAbatement);

    //行程列表
    @FormUrlEncoded
    @POST("v/order/gain-list.json")
    Call<TravelRecordBean> getTravelRecord(@FieldMap Map<String, String> map, @Field("pageNo") String page, @Field("pageSize") String pageSize, @Field("orderBusinessType") String orderBusinessType);

    //取消订单
    @FormUrlEncoded
    @POST("v/order/cancel.json")
    Call<CancelOrder> cancelOrder(@FieldMap Map<String, String> map, @Field("orderId") String orderId);

    //检查是否后台已经自动取消订单
    @FormUrlEncoded
    @POST("v/order/check-auto-cancel.json")
    Call<CheckCarOrderBean> checkAutoCancel(@FieldMap Map<String, String> map, @Field("orderId") String orderId);

    //获取已存在的行程
    @FormUrlEncoded
    @POST("v/order/get-unfinish.json")
    Call<ExistingTravel> getExistingTravel(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("v/order/detail.json")
    Call<TravelDetailBean> getTravelDetail(@FieldMap Map<String, String> map, @Field("orderId") String orderId);

    //获取蓝牙信息
    @FormUrlEncoded
    @POST("v/bluetooth/bluetoothInfo.json")
    Call<CarBleBean> getCarBleInfo(@FieldMap Map<String, String> map, @Field("carId") String carId);

    //优惠券
    @FormUrlEncoded
    @POST("v/coupon/add-to-user.json")
    Call<ExchangeCouponBean> exchangeCoupon(@FieldMap Map<String, String> map, @Field("code") String code);

    @FormUrlEncoded
    @POST("v/coupon/list-v2.json")
    Call<MyCouponBean> getAllCoupon(@FieldMap Map<String, String> map, @Field("pageNo") String pageNo, @Field("pageSize") String pageSize, @Field("couponsStatus") String couponsStatus);


    //获取上传图片的key和token
    @FormUrlEncoded
    @POST("bce/getsts.json")
    Call<UploadImageBaidu> uploadImageBaidu(@FieldMap Map<String, String> map, @Field("command") String command, @Field("type") String type);


    //获取上传图片的key和token
    @FormUrlEncoded
    @POST("auth/img.json")
    Call<UploadImageBean> uploadImage(@FieldMap Map<String, String> map, @Field("ext") String ext, @Field("size") String size,
                                      @Field("width") String width, @Field("height") String height, @Field("type") String type, @Field("businessType") String businessType, @Field("source") String source);

    //提交身份证接口
    @FormUrlEncoded
    @POST("v/user/examine.json")
    Call<CommitCertificateBean> confirmIdCardCommit(@FieldMap Map<String, String> map, @Field("userName") String userName, @Field("identityCardNum") String identityCardNum);

    //提交驾驶证接口
    @FormUrlEncoded
    @POST("v/user /license-upload.json")
    Call<CommitCertificateBean> confirmDrivingCommit(@FieldMap Map<String, String> map, @Field("identityPositivePicture") String identityPositivePicture,
                                                     @Field("identityOppositePicture") String identityOppositePicture, @Field("licensePicture") String licensePicture);


    //汽车结算详情
    @FormUrlEncoded
    @POST("v/order/pay-page-v2.json")
    Call<SettlementDetailBean> settlementDetail(@FieldMap Map<String, String> map, @Field("orderId") String orderId);

    //支付宝保证金
    @FormUrlEncoded
    @POST("v/account/recharge-bail.json")
    Call<AlipayPreBean> aliPayDeposit(@FieldMap Map<String, String> map, @Field("money") String money,
                                      @Field("style") String style, @Field("bailType") String bailType);


    //微信保证金
    @FormUrlEncoded
    @POST("v/account/recharge-bail.json")
    Call<WXPreBean> weChatDeposit(@FieldMap Map<String, String> map, @Field("money") String money,
                                  @Field("style") String style, @Field("bailType") String bailType);

    //支付宝充值
    @FormUrlEncoded
    @POST("v/account/recharge.json")
    Call<AlipayPreBean> aliPayRecharge(@FieldMap Map<String, String> map, @Field("money") String money, @Field("style") String style);


    //微信充值
    @FormUrlEncoded
    @POST("v/account/recharge.json")
    Call<WXPreBean> weChatRecharge(@FieldMap Map<String, String> map, @Field("money") String money, @Field("style") String style);

    /**
     * 汽车订单个人账户支付
     */
    @FormUrlEncoded
    @POST("v/order/pay-car-order")
    Call<CarPayBean> payCarOrder(@FieldMap Map<String, String> map, @Field("orderId") String orderId, @Field("couponId") String couponId);


    //汽车订单支付宝支付
    @FormUrlEncoded
    @POST("v/order/pay-by-ali-or-wechat.json")
    Call<AlipayPreBean> aliPayPre(@FieldMap Map<String, String> map, @Field("couponId") String couponId, @Field("orderId") String orderId, @Field("style") String style);

    //汽车订单微信支付
    @FormUrlEncoded
    @POST("v/order/pay-by-ali-or-wechat.json")
    Call<WXPreBean> weChatPre(@FieldMap Map<String, String> map, @Field("couponId") String couponId, @Field("orderId") String orderId, @Field("style") String style);

    //个人账户支付
    @FormUrlEncoded
    @POST("v/order/pay-person-account.json")
    Call<AccountInfoBean> accountPay(@FieldMap Map<String, String> map, @Field("orderId") String orderId, @Field("couponId") String couponId);


    //支付后通知服务器
    @FormUrlEncoded
    @POST("v/order/pay-notify.json")
    Call<ResultBean> notifyPayDone(@FieldMap Map<String, String> map, @Field("outTradeNo") String outTradeNo, @Field("payMent") String payMent);

    //充值明细
    @FormUrlEncoded
    @POST("v/account/recharge-list.json")
    Call<ChargeDetailBean> getChargeDetail(@FieldMap Map<String, String> map, @Field("pageNo") String pageNo, @Field("pageSize") String pageSize);

    @FormUrlEncoded
    @POST("share/share-invite.json")
    Call<InviteFriendsBean> inviteFriends(@FieldMap Map<String, String> map, @Field("type") String type);

    //获取投诉建议
    @FormUrlEncoded
    @POST("v/complaint/tags.json")
    Call<ComplaintsTagBean> getComplaintsTag(@FieldMap Map<String, String> map, @Field("businessType") String businessType);

    //投诉建议
    @FormUrlEncoded
    @POST("v/complaint/add/v2.json")
    Call<FeedbackBean> commitComplaints(@FieldMap Map<String, String> map, @Field("content") String content,
                                        @Field("pictures") String key, @Field("businessType") String businessType, @Field("orderId") String orderId,
                                        @Field("licenseTag") String licenseTag, @Field("tags") String tags);

    //个人中心
    @FormUrlEncoded
    @POST("v/user/center-info")
    Call<PersonalCenterBean> getMyInfoData(@FieldMap Map<String, String> map);


    //退还保证金
    @FormUrlEncoded
    @POST("v/account/return-bail.json")
    Call<ReturnDepositBean> returnDeposit(@FieldMap Map<String, String> map, @Field("bailType") String bailType);

    //汽车详情
    @FormUrlEncoded
    @POST("v/order/order-detail.json")
    Call<CarOrderDetailBean> getTravelDetail(@FieldMap Map<String, String> map, @Field("orderId") String orderId, @Field("orderBusinessType") String orderBusinessType);

    //钱包
    @FormUrlEncoded
    @POST("v/account/my-wallet.json")
    Call<WalletBean> getWallet(@FieldMap Map<String, String> map);

    //保证金状态
    @FormUrlEncoded
    @POST("v/account/check-return-bail.json")
    Call<DepositStatus> getDepositStatus(@FieldMap Map<String, String> map);


    //个人信息
    @FormUrlEncoded
    @POST("v/user/user-info.json")
    Call<PersonalInfoBean> getPersonalInfo(@FieldMap Map<String, String> map);

    /**
     * 获取充值页面轮播广告
     */
    @FormUrlEncoded
    @POST("v/account/recharge-ad")
    Call<RechargeAdBean> getRechargeAd(@FieldMap Map<String, String> map);


    /**
     * 城市围栏
     */
    @FormUrlEncoded
    @POST("park/park-fence-all.json")
    Call<CityBoundBean> getFenceList(@FieldMap Map<String, String> map);

    /**
     * 摇一摇
     */
    @FormUrlEncoded
    @POST("v/prize/return-draw-prize-result")
    Call<ShakeResultBean> getShakePrize(@FieldMap Map<String, String> map, @Field("address") String address);

    /**
     * 领奖
     */
    @FormUrlEncoded
    @POST("v/prize/gain-prize")
    Call<AwardBean> receivePrize(@FieldMap Map<String, String> map, @Field("shakeId") String shakeId);

    //汽车整备提交
    @FormUrlEncoded
    @POST("v/order/upload-prepare.json")
    Call<ResultBean> commitSetup(@FieldMap Map<String, String> map, @Field("orderId") String orderId, @Field("pictureIdStr") String pictureIdStr);

    //检查是否享受汽车整备送优惠券活动
    @FormUrlEncoded
    @POST("v/order/prepare-condition.json")
    Call<CheckSetupBean> checkSetup(@FieldMap Map<String, String> map, @Field("orderId") String orderId);

    /**
     * 开奖的跑马灯数据
     */
    @FormUrlEncoded
    @POST("prize/gain-lottery-horse-race-lamp.json")
    Call<PraiseMarqueeBean> getPraiseMarqueeData(@FieldMap Map<String, String> map);

    /**
     * 提交停车费
     */
    @FormUrlEncoded
    @POST("v/order/submit-parking-fee.json")
    Call<ParkFeeBean> getParkFeeData(@FieldMap Map<String, String> map, @Field("orderId") String orderId, @Field("parkingFee") String parkingFee);

    /**
     * 是否在栅栏外
     */
    @FormUrlEncoded
    @POST("v/park/point-park-money.json")
    Call<CheckPositionBean> getCheckPosition(@FieldMap Map<String, String> map, @Field("orderId") String orderId, @Field("carId") String carId);

    /**
     * 认证通过
     */
    @FormUrlEncoded
    @POST("v/user/identification.json")
    Call<UserCarInforBean> getUserCarInfo(@FieldMap Map<String, String> map);

}





